Resource access control

ABSTRACT

Various embodiments enable mappings of logical regions to physical regions for a memory resource for data writes to be maintained. A first mapping of logical regions to physical regions and a second mapping of logical regions to physical regions for a memory resource are maintained. The second mapping comprises a safe state of the memory resource. Responsive to receiving a request to write data to a logical region of the logical regions, a first set of data is written to a first physical region of the physical regions according to the first mapping of logical regions to physical regions. Responsive to receiving a request to read data from the logical region of the logical regions, a second set of data is read from a second physical region of the physical regions according to the second mapping of logical regions to physical regions.

CROSS REFERENCE TO RELATED APPLICATION

This application is a divisional of U.S. patent application Ser. No.12/817,662, filed Jun. 17, 2010 and titled “RESOURCE ACCESS CONTROL,”and which issued as U.S. Pat. No. 9,367,365 on Jun. 14, 2016, the entirecontents of which are hereby incorporated by reference in theirentirety.

BACKGROUND

Due to the number of processes running on today's computing devices,competition for computing resources can occur. This competition cansometimes result in undesirable interruptions in processes. For example,when a user is interacting with a user interface on a computing device,competition for a processor and/or memory resource can cause the userinterface to temporarily freeze while it waits for another process tofinish accessing the resource. This phenomenon may reduce the user'senjoyment of the computing experience.

SUMMARY

This Summary is provided to introduce a selection of concepts in asimplified form that are further described below in the DetailedDescription. This Summary is not intended to identify key features oressential features of the claimed subject matter, nor is it intended tobe used to limit the scope of the claimed subject matter.

Various embodiments can control access to a computing resource (e.g., amemory resource) by detecting that a high priority activity isattempting to access the resource and preventing a lower priorityactivity from accessing the resource. The lower priority activity can beallowed access to the resource after the high priority activity isfinished accessing the resource.

In some embodiments, access to a memory resource can be controlled bycaching memory operations (e.g., data write and/or file closeoperations) for a lower priority activity while allowing a high priorityactivity to access the memory resource. When it is detected that thehigh priority activity is not accessing the memory resource, the cachedmemory operations can be transacted to memory. For example, dataassociated with a cached write operation can be written to memory and/ora file associated with a cached file close operation can be closed.

Various embodiments enable memory operations to be mapped to account forchanges in data ordering that can occur when a lower priority activityis suppressed. For example, when an activity requests that data bewritten to a logical region of memory, a mapping is created that mapsthe logical memory region to a physical memory region. The data iswritten to the physical memory region and the mapping of the logicalmemory region to the physical memory region is recorded. When anactivity then requests to read data from the logical memory region, themapping is consulted and the data is read and returned from the physicalmemory region. According to some embodiments, the mapping of logicalmemory regions to physical memory regions can allow memory operationsthat may occur out of order (e.g., out of order temporally due to thesuppression of an activity) to nonetheless maintain the integrity oftheir data ordering when read from memory.

BRIEF DESCRIPTION OF THE DRAWINGS

The same numbers are used throughout the drawings to reference likefeatures.

FIG. 1 illustrates an operating environment in which various principlesdescribed herein can be employed in accordance with one or moreembodiments.

FIG. 2 illustrates an example access controller in accordance with oneor more embodiments.

FIG. 3 illustrates one example of a memory layout in accordance with oneor more embodiments.

FIG. 4 is a flow diagram that describes steps in a method in accordancewith one or more embodiments.

FIG. 5 is a flow diagram that describes steps in a method in accordancewith one or more embodiments.

FIG. 6 is a flow diagram that describes steps in a method in accordancewith one or more embodiments.

FIG. 7 is a flow diagram that describes steps in a method in accordancewith one or more embodiments.

FIG. 8 illustrates an example system that can be used to implement oneor more embodiments.

DETAILED DESCRIPTION

Overview

Various embodiments can control access to a computing resource (e.g., amemory resource) by detecting that a high priority activity isattempting to access the resource and preventing a lower priorityactivity from accessing the resource. The lower priority activity can beallowed access to the resource after the high priority activity isfinished accessing the resource. In some embodiments, examples ofactivities can include applications, processes, threads, and so on.According to some embodiments, activities can be designated as “highpriority activities” or “low priority activities” using a variety ofdifferent techniques, such as designation by a programmer or otherentity, automatic designation by way of association with a particularapplication (e.g., a web browser), designation by an end user, and soon.

For purposes of illustration, consider the following exampleimplementation scenario. A mobile device includes a graphical userinterface (GUI) via which a user can interact with the mobile device.GUI access to computing resources of the mobile device (e.g., access tomemory) can be considered a high priority activity. According to someembodiments, when a GUI activity is reading data from memory, a lowerpriority activity (e.g., a database update activity) is prevented fromaccessing the memory. This prevents the GUI activity from having to waitfor memory access which can cause interruptions in the user'sinteraction with the GUI. When the GUI activity is finished reading frommemory, the lower priority activity can then be permitted to access thememory.

In some embodiments, access to a memory resource can be controlled bycaching memory operations (e.g., data write and/or file closeoperations) for a lower priority activity while allowing a high priorityactivity to access the memory resource. When it is detected that thehigh priority activity is finished accessing the memory resource, memoryoperations (e.g., the cached memory operations) can be transacted tomemory. For example, data associated with a cached write operation canbe written to disk or a file associated with a cached file closeoperation can be closed.

According to some embodiments, data writes associated with a highpriority activity (e.g., a GUI activity) can be delayed until aftercached memory operations are written to a memory resource. This canprevent an error from occurring when a data write associated with a highpriority activity includes a dependency on a data write associated witha lower priority activity. Thus, in some embodiments, a high prioritydata write can be delayed until after lower priority data writes aretransacted to memory.

Various embodiments enable memory operations to be mapped to account forchanges in data ordering that can occur when a lower priority activityis suppressed. For example, when an activity requests that data bewritten to a logical memory region, a mapping is created that maps thelogical memory region to a physical memory region. The data is writtento the physical memory region and the mapping of the logical memoryregion to the physical memory region is recorded. When an activity thenrequests to read data from the logical memory region, the mapping isconsulted and the data is read and returned from the physical memoryregion. According to some embodiments, the mapping of logical memoryregions to physical memory regions can allow memory operations that mayoccur out of order (e.g., out of order temporally due to the suppressionof an activity) to nonetheless maintain the integrity of their dataordering when read from memory. Thus, in some embodiments, the temporalorder of memory operations is preserved such that, if a device restartoccurs, data can be read from memory according to a safe memory state.

In the discussion that follows, a section entitled “OperatingEnvironment” is provided and describes one example environment in whichone or more embodiments can be employed. Following this, a sectionentitled “Example Access Controller” describes an example accesscontroller in accordance with one or more embodiments. Next, a sectionentitled “Example Memory Layout and Mapping” describes how logicalmemory regions and physical memory regions of a memory can be mapped inaccordance with one or more embodiments.

Following this, a section entitled “Example Methods” describes examplemethods in accordance with one or more embodiments. Last, a sectionentitled “Example System” describes an example system that can beutilized to implement one or more embodiments.

Consider now an example operating environment in which one or moreembodiments can be implemented.

Operating Environment

FIG. 1 illustrates an operating environment in accordance with one ormore embodiments, generally at 100. Environment 100 includes a computingdevice 102 having one or more processors 104, one or morecomputer-readable storage media 106 and one or more applications 108that reside on the computer-readable storage media and which areexecutable by the processor(s). The computer-readable storage media caninclude, by way of example and not limitation, all forms of volatile andnon-volatile memory and/or storage media that are typically associatedwith a computing device. Such media can include ROM, RAM, flash memory,hard disk, removable media and the like. One specific example of acomputing device is shown and described below in FIG. 8.

In addition, computer-readable storage media 106 includes an accesscontroller 110 that can be utilized to implement embodiments discussedherein and that is configured to operate as described below. Inoperation, access controller 110 can perform a variety of functions,such as detecting high priority activities, suppressing lower priorityactivities, mapping logical memory regions to physical memory regions,and so on. Example components and operational characteristics of accesscontroller 110 are discussed in more detail below.

According to one or more embodiments, access controller 110 and/or itsconstituent components can be implemented via software or programmodules. Generally, software includes routines, programs, objects,components, data structures, and so forth that perform particular tasksor implement particular abstract data types. An implementation of thesemodules may be stored on or transmitted across some form ofcomputer-readable media. The computer-readable media may include avariety of available medium or media that may be accessed by a computingdevice. By way of example, and not limitation, computer-readable mediamay comprise “computer-readable storage media.”

In addition the above-mentioned features, environment 100 includes anetwork 112, such as the Internet, and one or more remote resources 114that can be accessed by and have access to computing device 102. It isto be appreciated and understood that one or more components of accesscontroller 110 can be accessed by and/or reside on a server ornetwork-accessible computer (e.g., remote resource 114), other thancomputing device 102. Computing device 102 can be embodied as anysuitable computing device such as, by way of example and not limitation,a desktop computer, a portable computer, a handheld computer such as apersonal digital assistant (PDA), cell phone, a mobile device, and thelike.

Having described an example operating environment, consider now adiscussion of an example access controller in accordance with one ormore embodiments.

Example Access Controller

FIG. 2 illustrates at 200 one example implementation of accesscontroller 110 in accordance with one or more embodiments. Accesscontroller 110 includes a top filter 202, a cache filter 204, and abottom filter 206. Also illustrated at 200 although not necessarilyincluded as part of access controller 110 are a file system 208 and amemory 210. These example aspects associated with access controller 110are each discussed in more detail below.

According to some embodiments, top filter 202 is operable to controlaccess to computing resources such as memory 210. Examples of memory 210include computer-readable storage media, examples of which are presentedabove and below. In at least some embodiments, top filter 202 cancontrol access to memory 210 by suppressing memory operations such asflush operations and/or file close operations.

In some embodiments, a flush operation refers generally to the processof writing data from a cache (e.g., a RAM cache) to a memory resourcesuch as memory 210. A flush operation can occur when an activity (e.g.,an application) requests a flush and/or when a file is closed. Topfilter 202 can suppress a flush operation by preventing a flush requestfrom being passed to other components (e.g., cache filter 204 and/orfile system 208). Top filter 202 can also suppress a flush operation bymaintaining a file handle for a file that is closed by an activity suchthat closing the handle by the activity does not cause a flush operationto occur. This aspect of flush suppression is discussed in more detailbelow.

According to some embodiments, cache filter 204 is operable to managecertain aspects of file and/or data caching. For example, cache filter204 can maintain some memory resource as a cache for an activity and/orapplication that resides on computing device 102. In one or moreembodiments, when a high priority activity is accessing memory 210,cache filter 204 maintains cached data in an associated cache (e.g., fora suppressed lower-priority activity). When top filter 202 detects thatthe high priority activity is not accessing the memory 210, top filter202 notifies cache filter 202 that it can flush cached data. Cachefilter 202 can then cause cached data to be written to memory 210.

In some embodiments, bottom filter 206 is configured to receive arequest to write data to a logical region of memory 210 and, responsiveto the request, map the logical region to a physical region of thememory. For example, with reference to a disk memory, a physical regioncan correspond to a physical sector of the disk. The data can be writtento the physical region and when a request is received to read data fromthe logical region, the data from the physical region can be retrievedin response to the read request. Thus, in some embodiments bottom filter206 can maintain a data structure that tracks mappings between logicalregions of memory 210 and physical regions of the memory. Bottom filter206 can also track which physical regions of memory 210 have beenwritten and which physical regions of memory 210 are available to bewritten to.

According to one or more embodiments, bottom filter 206 can alsomaintain a set of logical region to physical region mappings thatrepresent a safe state of memory 210 that can be reloaded from memory ifa system interruption occurs. Examples of a system interruption includea hard device reset, a battery failure, a battery removal, and so on. Ifa system interruption occurs, bottom filter 206 can indicate to thesystem a set of logical region to physical region mappings thatrepresent the safe state of memory 210, and that set of mappings can beused to reload data from the memory. Aspects of logical region tophysical region mappings and memory state maintenance are discussed inmore detail below. In some embodiments, file system driver 208 driver isconfigured to interact with access controller 110 to implement a filesystem associated with computing device 102. As part of maintaining thefile system, file system driver 208 can specify and/or determine aformat in which data is stored on memory 210. According to one or moreembodiments, bottom filter 206 can interact with file system driver 208to ensure that file system driver 208 has access to a logical view ofmemory 210 that complies with the file system format even if the actualphysical region write layout does not. For example, file system driver208 can request data from memory 210 according to a particular logicalregion layout and bottom filter 206 can utilize a logical region tophysical region mapping to retrieve data from memory 210 according to aphysical region layout that differs from the logical region layoutrequested by file system driver 208.

Having described an example access controller, consider now a discussionof example memory layout and mapping in accordance with one or moreembodiments.

Example Memory Layout and Mapping

FIG. 3 illustrates generally at 300 one example of a memory layout inaccordance with one or more embodiments. In some embodiments, multiplestates of the memory can be tracked via memory layout 300. To enablemultiple states of the memory to be tracked, memory layout 300 includesa header 302, bitmaps 304, region maps 306, and data regions 308.According to some embodiments, header 302 can be utilized to storeinformation regarding states of the memory. For example, header 302 canindicate which of the bitmaps 304 and/or region maps 306 correspond to asafe state of the memory and thus can be used to reload data from memory(e.g., after a hard restart).

Bitmaps 304 include an indication of which regions are available to bewritten to. For example, the multiple states of the memory can includean “A” state and a “B” state. Thus, bitmaps 304 can include a bitmap Awhich indicates which regions are available to be written to accordingto the A state, and a bitmap B which indicates which regions areavailable to be written to according to the B state.

Region maps 306 include mappings of logical regions to physical regionsfor multiple states of the memory (e.g., the A state and/or the Bstate). Data regions 308 are the actual physical regions of the memory(e.g., sectors) that store data on the memory. According to someembodiments, region maps 306 include a region map 310 and a region map312. Region map 310 includes logical region to physical region mappingsfor the A state of the memory and region map 312 includes logical regionto physical region mappings for the B state.

According to some embodiments, for each logical region, one of themultiple states of the memory (e.g., the A state or the B state) can bedesignated as a safe state of the memory that can be used to reload datafrom memory for a particular logical region. For purposes ofillustration, assume that the A state is the safe state of the memoryfor a logical region 50. Thus, the A state can be maintained as a staticversion of the logical region 50 and the physical region 1 (indicated inthe region map 310) will not be available to be written to. If a systemrestart occurs (e.g., due to a user-initiated hard restart and/or apower loss), region map 310 will be used to reload data from memory forlogical region 50 and thus data for logical region 50 will be read fromphysical region 1. Reloading data from memory can include reloading allor part of an operating system, processes, applications, and so on.

In some embodiments, a memory operation (e.g., a write operation)associated with logical region 50 that occurs after the A state has beendesignated as a safe state will be included as part of the B state. Forexample, a write operation that occurs after the A state has beendesignated as a safe state can be mapped and recorded as part of theregion map 312. Thus, the A state can remain static and provide a safestate that can be reloaded from memory. The B state can allow forfurther changes to memory to be made without compromising the integrityof the A state. In some embodiments, physical regions associated withregion map 310 do not overlap with physical regions associated withregion map 312. Thus, in some embodiments, a write made to a physicalregion according to region map 312 will not overwrite a physical regionindicated in region map 310.

According to some embodiments, the designation of the safe state of thememory (e.g., for a particular logical region to physical regionmapping) can be changed. For example, region map 310 can initially bedesignated as a safe state for logical region 50 (e.g., the mapping tophysical region 1). A subsequent write to logical region 50 can beindicated in region map 312 (e.g., the mapping to physical region 10).The mapping for logical region 50 indicated by region map 312 can besaved to memory and header 302 can be updated to indicate that regionmap 312 corresponds to a safe state of the memory for logical region 50.This can allow physical region 1 to then be made available for datawrites since physical region 10 will now be used for any lookups tological region 50.

While memory layout 300 is illustrated with reference to two memorystates (e.g., the A state and the B state), this is not intended to belimiting. Any number of memory states can be utilized without departingfrom the spirit and scope of the claimed embodiments.

In some embodiments, maintaining multiple states of a memory can causeavailable physical memory space (e.g., available physical regions) to bereduced. To manage the reduction in available physical memory space, insome embodiments bottom filter 206 monitors the amount of availablephysical memory space and can communicate this amount to othercomponents of access controller 110, such as top filter 202. If bottomfilter 206 ascertains that the amount of physical memory space availablefor data writes has fallen below a threshold amount (e.g., inmegabytes), bottom filter 206 can communicate to top filter 206 thatlower priority activities should stop being suppressed so that theactive state of the memory (e.g., one of the region maps 306) can besaved to memory and thus become the safe state of the memory. When thisoccurs, the physical memory space utilized by the previous safe state isno longer protected and is made available for data writes. According tosome embodiments, the previous safe state of the memory can then beutilized as the active state of the memory.

Having described example memory layout and mapping, consider now adiscussion of example methods in accordance with one or moreembodiments.

Example Methods

FIG. 4 is a flow diagram that describes steps in a method in accordancewith one or more embodiments. The methods discussed herein can beimplemented in connection with any suitable hardware, software, firmwareor combination thereof. In at least some embodiments, aspects of themethods discussed herein can be implemented by software modules, such asaccess controller 110. It is to be appreciated and understood that themethods discussed herein can be performed by a suitably-configuredserver, a network-accessible computing device, and/or a client computingdevice. For purposes of illustration, certain aspects of the methodsherein are discussed with reference to memory layout 300.

Step 400 ascertains that a high priority activity is accessing aresource. For example, a graphical user interface activity can bereading data from memory. Step 402 suppresses a lower priority activityassociated with the resource. In some embodiments, the lower priorityactivity can include a flush operation associated with an application orother process, examples of which are discussed above.

According to some example embodiments, when a lower priority activity isbeing suppressed, data operations associated with the lower priorityactivity are stored in a cache. For example, cache filter 204 (FIG. 2)can monitor the cache for available storage space. If the amount ofstorage in the cache gets below a certain amount, cache filter 204 cancause the cache to flush data to free-up cache storage space even if topfilter 202 is currently suppressing data flushes. In some embodiments,when the cache receives a data read request from a lower priorityactivity for data that is not in the cache, the cache can retrieve thedata from a memory resource even if top filter 202 is suppressing dataflushes.

Step 404 determines that the high priority activity is not accessing theresource. Step 406 allows the low priority activity associated with theresource. For example, top filter 202 can indicate to cache filter 204and/or bottom filter 206 that a flush operation can now be performed. Insome embodiments, the top filter 202 is configured to track which lowerpriority activities have been suppressed and indicate to othercomponents of access controller 110 that the lower priority activitiesand/or associated flushes can now be performed.

According to some embodiments, when it is determined that a highpriority activity is not accessing a resource, a low priority activityassociated with the resource can stop being suppressed after a certaintime period expires. For example, after a high priority activity isfinished reading data from memory, a timer can be started. If the timerexpires before any additional high priority reads are detected, accessto the resource by lower priority activities can stop being suppressed.If a high priority activity accesses the resource before the timerexpires, however, the timer can be stopped and/or reset. The timer canthen be restarted once the higher priority activity is no longeraccessing the resource.

FIG. 5 is a flow diagram that describes steps in a method in accordancewith one or more embodiments. In some embodiments, the method can beimplemented to control file close operations and/or to prevent a flushoperation from occurring responsive to a file close operation when ahigh priority activity is accessing a resource.

Step 500 receives an indication of a file open operation. For example,an application or other activity can cause a file to be opened. Step 502opens a lethargic handle for the file. According to one or moreembodiments, the lethargic handle is opened automatically when a file isopened and can be used (e.g., by top filter 202) to prevent the filefrom being closed while a high priority activity is accessing a resourceand/or while lower priority activities are being suppressed. In someembodiments, the lethargic handle includes no read permissions, no writepermissions, and imposes no sharing restrictions on an associated file.Thus, according to some embodiments, the lethargic does not conflictwith permissions associated with other file handles. Step 504 receivesan indication of a close file operation. For example, an application orother activity that opened the file can initiate the close fileoperation.

Step 506 determines if a high priority activity is accessing a resource.As discussed above, one example of a high priority activity accessing aresource is a GUI activity reading data from memory. If a high priorityactivity is accessing a resource (“Yes”), step 508 keeps the lethargichandle open. According to some embodiments, keeping the lethargic handleopen prevents a flush from occurring due to the file close operation. Ifa high priority activity is not accessing a resource (“No”), step 510closes the lethargic handle. In some embodiments, closing the lethargichandle can allow a flush operation (e.g., initiated via cache filter204) to occur.

FIG. 6 is a flow diagram that describes steps in a method in accordancewith one or more embodiments. In some embodiments, the method can beimplemented to enable mappings of logical regions to physical regionsfor data writes to be maintained. Step 600 receives a request to writedata to a logical region. For example, an application or other activitycan submit data to be written to a logical region of a disk memory. Step602 creates a mapping of the logical region to a physical region for thefirst request. According to some embodiments, before a mapping of alogical region to a physical region occurs, a list of available physicalregions is first inspected to determine a physical region that isavailable for the data write. For example, bitmaps 304 can be inspectedto locate a physical region that is available to be written to.

Step 604 writes the data to the physical region. Step 606 sets thephysical region to occupied. For example, bitmaps 304 (of FIG. 3) can bemarked to indicate that the physical region is being used to store data.Step 608 determines if data flushes are being suppressed. For example,data flushes can be suppressed responsive to a high priority activityreading data from a memory resource. If data flushes are beingsuppressed (“Yes”), step 610 stores the mapping of the logical region tothe physical region in volatile memory. For example, the mapping of thelogical region to the physical region can be stored in RAM.

If data flushes are not being suppressed (“No”), step 612 stores themapping of the logical region to the physical region in non-volatilememory. Step 614 utilizes the mapping of the logical region to thephysical region for a request to read data from the logical region.

In some embodiments, if a device restart happens before the mapping ofthe logical region to the physical region is stored in non-volatilememory (e.g., before step 612), the mapping of the logical region to thephysical region can be lost since the mapping is stored in volatilememory which may lose power during a device restart. In theseembodiments, a previously-stored mapping of the logical region to aphysical region can be utilized in responsive to a request to read datafrom the logical region.

FIG. 7 is a flow diagram that describes steps in a method in accordancewith one or more embodiments. In some embodiments, the method can beimplemented to read data according to mappings of logical regions tophysical regions.

Step 700 receives a request to read data from a logical region. Step 702locates a current mapping of the logical region to a physical region.For example, one of region maps 306 can be designated (e.g., by header302) as the current mapping of the logical region to a physical region.Step 704 reads data from memory according to the current mapping of thelogical region to the physical region.

Having described example methods, consider now a discussion of anexample system in accordance with one or more embodiments.

Example System

FIG. 8 illustrates an example computing device 800 that can be used toimplement the various embodiments described above. Computing device 800can be, for example, computing device 102 of FIG. 1 or any othersuitable computing device.

Computing device 800 includes one or more processors or processing units802, one or more memory and/or storage components 804, one or moreinput/output (I/O) devices 806, and a bus 808 that allows the variouscomponents and devices to communicate with one another. Bus 808represents one or more of any of several types of bus structures,including a memory bus or memory controller, a peripheral bus, anaccelerated graphics port, and a processor or local bus using any of avariety of bus architectures. Bus 808 can include wired and/or wirelessbuses.

Memory/storage component 804 represents one or more computer storagemedia. Component 804 can include volatile media (such as random accessmemory (RAM)) and/or non-volatile media (such as read only memory (ROM),Flash memory, optical disks, magnetic disks, and so forth). Component804 can include fixed media (e.g., RAM, ROM, a fixed hard drive, etc.)as well as removable media (e.g., a Flash memory drive, a removable harddrive, an optical disk, and so forth).

One or more input/output devices 806 allow a user to enter commands andinformation to computing device 800, and also allow information to bepresented to the user and/or other components or devices. Examples ofinput devices include a keyboard, a cursor control device (e.g., amouse), a microphone, a scanner, and so forth. Examples of outputdevices include a display device (e.g., a monitor or projector),speakers, a printer, a network card, and so forth.

Various techniques may be described herein in the general context ofsoftware or program modules. Generally, software includes routines,programs, objects, components, data structures, and so forth thatperform particular tasks or implement particular abstract data types. Animplementation of these modules and techniques may be stored on ortransmitted across some form of computer readable media. Computerreadable media can be any available medium or media that can be accessedby a computing device. By way of example, and not limitation, computerreadable media may comprise “computer-readable storage media”.

“Computer-readable storage media” include volatile and non-volatile,removable and non-removable media implemented in any method ortechnology for storage of information such as computer readableinstructions, data structures, program modules, or other data.Computer-readable storage media include, but are not limited to, RAM,ROM, EEPROM, flash memory or other memory technology, CD-ROM, digitalversatile disks (DVD) or other optical storage, magnetic cassettes,magnetic tape, magnetic disk storage or other magnetic storage devices,or any other medium which can be used to store the desired informationand which can be accessed by a computer.

CONCLUSION

Various embodiments can control access to a computing resource (e.g., amemory resource) by detecting that a high priority activity is accessingthe resource and preventing a lower priority activity from accessing theresource. For example, the lower priority activity can be prevented fromflushing data from a cache to memory. The lower priority activity can beallowed access to the resource after the high priority activity isfinished accessing the resource. For example, memory operationsassociated with the lower priority activity can then be flushed from thecache to memory. Various embodiments enable memory operations to bemapped to account for changes in data ordering that can occur when alower priority activity is suppressed. For example, when an activityrequests that data be written to a logical memory region, a mapping iscreated that maps the logical memory region to a physical memory region.The data can then be written to the physical memory region.

Although the subject matter has been described in language specific tostructural features and/or methodological acts, it is to be understoodthat the subject matter defined in the appended claims is notnecessarily limited to the specific features or acts described above.Rather, the specific features and acts described above are disclosed asexample forms of implementing the claims.

What is claimed is:
 1. A computer system, comprising: one or moreprocessors; and one or more computer readable storage media havingstored thereon computer-executable instructions that are executable bythe one or more processors to cause the computer system to enablemappings of logical regions to physical regions for a memory resourcefor data writes to be maintained, the computer-executable instructionsincluding instructions that are executable to cause the computer systemto perform at least the following: maintain a first mapping of logicalregions to physical regions and a second mapping of logical regions tophysical regions for a memory resource, the second mapping of logicalregions to physical regions comprising a safe state of the memoryresource; responsive to receiving a request to write data to a logicalregion of the logical regions, write a first set of data to a firstphysical region of the physical regions according to the first mappingof logical regions to physical regions; and responsive to receiving arequest to read data from the logical region of the logical regions,read a second set of data from a second physical region of the physicalregions according to the second mapping of logical regions to physicalregions.
 2. The computer system of claim 1, the computer-executableinstructions also including instructions that are executable to causethe computer system to maintain a header that indicates that the secondmapping of logical regions to physical regions comprises a safe statethat can be used to read data from the logical region.
 3. The computersystem of claim 1, wherein physical regions associated with the firstmapping of logical regions to physical regions do not overlap withphysical regions associated with the second mapping of logical regionsto physical regions.
 4. The computer system of claim 1, wherein therequest to read data from the logical region of the logical regions isreceived responsive to a device restart operation.
 5. The computersystem of claim 1, the computer-executable instructions also includinginstructions that are executable to cause the computer system to writethe first mapping of logical regions to physical regions to the memoryresource effective to cause the first mapping of logical regions tophysical regions to be the safe state of the memory resource.
 6. Thecomputer system of claim 1, wherein writing the first set of data to thefirst physical region comprises setting the first physical region tooccupied.
 7. The computer system of claim 1, the computer-executableinstructions also including instructions that are executable to causethe computer system to perform at least one of: based at least on dataflushes being suppressed, store one or both of the first mapping oflogical regions to physical regions or the second mapping of logicalregions to physical regions in volatile memory; and based at least ondata flushes not being suppressed, store one or both of the firstmapping of logical regions to physical regions or the second mapping oflogical regions to physical regions in non-volatile memory.
 8. A method,implemented at a computer system that includes one or more processors,for enabling mappings of logical regions to physical regions for amemory resource for data writes to be maintained, the method comprising:maintaining a first mapping of logical regions to physical regions and asecond mapping of logical regions to physical regions for a memoryresource, the second mapping of logical regions to physical regionscomprising a safe state of the memory resource; responsive to receivinga request to write data to a logical region of the logical regions,writing a first set of data to a first physical region of the physicalregions according to the first mapping of logical regions to physicalregions; and responsive to receiving a request to read data from thelogical region of the logical regions, reading a second set of data froma second physical region of the physical regions according to the secondmapping of logical regions to physical regions.
 9. The method of claim8, further comprising maintaining a header that indicates that thesecond mapping of logical regions to physical regions comprises a safestate that can be used to read data from the logical region.
 10. Themethod of claim 8, wherein physical regions associated with the firstmapping of logical regions to physical regions do not overlap withphysical regions associated with the second mapping of logical regionsto physical regions.
 11. The method of claim 8, wherein the request toread data from the logical region of the logical regions is receivedresponsive to a device restart operation.
 12. The method of claim 8,further comprising writing the first mapping of logical regions tophysical regions to the memory resource effective to cause the firstmapping of logical regions to physical regions to be the safe state ofthe memory resource.
 13. The method of claim 8, wherein writing thefirst set of data to the first physical region comprises setting thefirst physical region to occupied.
 14. The method of claim 8, furthercomprising at least one of: based at least on data flushes beingsuppressed, storing one or both of the first mapping of logical regionsto physical regions or the second mapping of logical regions to physicalregions in volatile memory; and based at least on data flushes not beingsuppressed, storing one or both of the first mapping of logical regionsto physical regions or the second mapping of logical regions to physicalregions in non-volatile memory.
 15. A computer program productcomprising one or more hardware storage devices having stored thereoncomputer-executable instructions that are executable by one or moreprocessors of a computer system to cause the computer system to enablemappings of logical regions to physical regions for a memory resourcefor data writes to be maintained, the computer-executable instructionsincluding instructions that are executable to cause the computer systemto perform at least the following: maintain a first mapping of logicalregions to physical regions and a second mapping of logical regions tophysical regions for a memory resource, the second mapping of logicalregions to physical regions comprising a safe state of the memoryresource; responsive to receiving a request to write data to a logicalregion of the logical regions, write a first set of data to a firstphysical region of the physical regions according to the first mappingof logical regions to physical regions; and responsive to receiving arequest to read data from the logical region of the logical regions,read a second set of data from a second physical region of the physicalregions according to the second mapping of logical regions to physicalregions.
 16. The computer program product of claim 15, thecomputer-executable instructions also including instructions that areexecutable to cause the computer system to maintain a header thatindicates that the second mapping of logical regions to physical regionscomprises a safe state that can be used to read data from the logicalregion.
 17. The computer program product of claim 15, wherein physicalregions associated with the first mapping of logical regions to physicalregions do not overlap with physical regions associated with the secondmapping of logical regions to physical regions.
 18. The computer programproduct of claim 15, wherein the request to read data from the logicalregion of the logical regions is received responsive to a device restartoperation.
 19. The computer program product of claim 15, thecomputer-executable instructions also including instructions that areexecutable to cause the computer system to write the first mapping oflogical regions to physical regions to the memory resource effective tocause the first mapping of logical regions to physical regions to be thesafe state of the memory resource.
 20. The computer program product ofclaim 15, the computer-executable instructions also includinginstructions that are executable to cause the computer system to performat least one of: based at least on data flushes being suppressed, storeone or both of the first mapping of logical regions to physical regionsor the second mapping of logical regions to physical regions in volatilememory; and based at least on data flushes not being suppressed, storeone or both of the first mapping of logical regions to physical regionsor the second mapping of logical regions to physical regions innon-volatile memory.